import { Input, Button } from 'antd';

type InputQuestionProps = {
  input: string;
  setInput: (value: string) => void;
  handleSend: () => void;
};

const InputQuestion = ({ input, setInput, handleSend }: InputQuestionProps) => {
  const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
    if (e.key === 'Enter') {
      e.preventDefault();
      handleSend();
    }
  };

  return (
    <div className="input-container">
      <Input.TextArea
        value={input}
        onChange={(e) => setInput(e.target.value)}
        onKeyDown={handleKeyDown}
        placeholder="输入问题（@选择模型，#选择MCP服务）"
        style={{ 
          marginBottom: '4px', 
          height: '90%',
          borderRadius: '10px',
          border: '1px solid #e0e0e0',
          boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
          padding: '8px',
          fontSize: '16px'
        }}
      />
      <div className="messages-button-group" style={{ display: 'flex', justifyContent: 'flex-end', gap: '8px' }}>
        <Button 
          onClick={() => {}}  // 可根据需要添加折叠逻辑
          type="default"
        >
          展开消息
        </Button>
      </div>
    </div>
  );
};

export default InputQuestion;